// 原始映射
const collegeMap = {
  "ZIJIN_ADDRESS_AND_SCHOOL_OF_MINING": "紫金地址与矿业学院",
  "SCHOOL_OF_ELECTRICAL_ENGINEERING_AND_AUTOMATION": "电气工程与自动化学院",
  "MEDICAL_COLLEGE_OF_FZU": "医学院",
  "SCHOOL_OF_ENVIRONMENTAL_AND_SAFETY_ENGINEERING": "环境与安全工程学院",
  "MAYNOOTH_INTERNATIONAL_SCHOOL_OF_ENGINEERING": "梅努斯国际工程学院",
  "INTERDISCIPLINARY_RESEARCH_INSTITUTE_OF_MEDICINE_AND_ENGINEERING": "医工交叉研究院",
  "SCHOOL_OF_ARCHITECTURE_AND_URBAN_RURAL_PLANNING": "建筑与城乡规划学院",
  "SCHOOL_OF_CIVIL_ENGINEERING": "土木工程学院",
  "SCHOOL_OF_COMPUTER_AND_BIG_DATA_INCLUDE_SCHOOL_OF_SOFTWARE_INCLUDE_SCHOOL_OF_ARTIFICIAL_INTELLIGENCE": "计算机与大数据学院（软件学院），人工智能学院",
  "SCHOOL_OF_CHEMICAL_ENGINEERING": "化工学院",
  "FACULTY_OF_HUMANITIES_AND_SOCIAL_SCIENCES": "人文社会科学学院",
  "XIAMEN_ACADEMY_OF_ARTS_AND_CRAFTS": "厦门工艺美术学院",
  "SCHOOL_OF_CONTINUING_EDUCATION": "先进制造学院与海洋学院",
  "SCHOOL_OF_MATERIALS_SCIENCE_AND_ENGINEERING": "材料科学与工程学院",
  "SCHOOL_OF_ADVANCED_MANUFACTURING_AND_OCEAN_COLLEGE": "先进制造学院与海洋学院",
  "SCHOOL_OF_MECHANICAL_ENGINEERING_AND_AUTOMATION": "机械工程及自动化学院",
  "SCHOOL_OF_CHEMISTRY": "化学学院",
  "FUTURE_MEMBRANE_TECHNOLOGY_INSTITUTE": "未来膜技术学院",
  "SCHOOL_OF_ECONOMICS_AND_MANAGEMENT": "经济与管理学院",
  "ZHICHENG_COLLEGE": "至诚学院",
  "SCHOOL_OF_LAW": "法学院",
  "SCHOOL_OF_PHYSICS_AND_INFORMATION_ENGINEERING_AND_SCHOOL_OF_MICROELECTRONICS": "物理与信息工程学院，微电子学院",
  "SCHOOL_OF_MATHEMATICS_AND_STATISTICS": "数学与统计学院",
  "SCHOOL_OF_MARXISM": "马克思主义学院",
  "SCHOOL_OF_BIOLOGICAL_SCIENCES_AND_ENGINEERING": "生物科学与工程学院",
  "SCHOOL_OF_FOREIGN_CHINESE_LANGUAGES": "外国语学院",
  "DEPARTMENT_OF_PHYSICAL_EDUCATION_AND_RESEARCH": "体育教学研究部"
}

// 只有枚举字符串
const collegeEnum = Object.keys(collegeMap);

// 只有学院名字
const collegeName = Object.values(collegeMap);

// 反映射
const collegeEnumMap = Object.fromEntries(
  Object.entries(collegeMap).map(([key, value]) => [value, key])
);

export function useCollegeEnum() {
  return {
    collegeMap,   // enum -> name mapping
    collegeEnum,  // only enum string
    collegeName,  // only name string
    collegeEnumMap // name -> enum mapping
  }
}